package com.zy.chapter10

/**
 * @author: zhaoyi
 * @create: 2020-06-11 22:44
 * @description: ${description}
 **/
object Test extends App {

  val wx = new SavingsAccount(100) with WXLogger
  val zfb = new SavingsAccount(100) with ZhiFuBaoLogger


  val yl = new SavingsAccount(100) {
    override def log(msg: String): Unit = {
      println(s"银联扣款##：$msg")
    }
  }


  wx.withdraw(1000)
  zfb.withdraw(50)
  yl.withdraw(1000)


}
